using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Alogient.Cameleon.Forms.Sdk.Items
{
    public class FormPage
    {
        #region Properties 

        public int ID { get; private set; }
        public int FormID { get; private set; }
        public FormStatus PageStatus { get; private set; }
        public int Order { get; private set; }
        public string Name { get; private set; }
        public string CultureCode { get; private set; }
        public bool VisibleLive { get; private set; }
        public bool VisiblePreview { get; private set; }

        private List<FormElement> elements = null;
        public List<FormElement> Elements
        {
            get
            { 
                if (this.elements == null)
                {
                    this.elements = loadElements();
                }

                return this.elements;
            }
        }

        private Form form = null;
        public Form Form
        {
            get 
            {
                if (this.form == null)
                {
                    this.form = new Form(this.FormID, this.CultureCode);
                }

                return this.form;
            }
        }

        #endregion

        #region Constructors

        private FormPage()
        {
            VisiblePreview = false;
            VisibleLive = false;
            CultureCode = string.Empty;
            Name = string.Empty;
            Order = 0;
            PageStatus = FormStatus.New;
            FormID = 0;
            ID = 0;
        }

        public FormPage(int id, string cultureCode): this()
        {
            throw new NotImplementedException("Not implemented"); // TODO
        }

        #endregion

        #region Methods

        private List<FormElement> loadElements()
        {
            throw new NotImplementedException("Not implemented"); // TODO
        }
        
        #endregion

    }
}
